//
//  LabelView.m
//  仿微信朋友圈
//
//  Created by dllo on 16/9/3.
//  Copyright © 2016年 DM.C. All rights reserved.
//

#import "LabelView.h"
#import "SDAutoLayout.h"
@implementation LabelView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creteLabel];
    }
    return self;
}
- (void)creteLabel {
    self.contentLabel = [[UILabel alloc] init];
    [self addSubview:_contentLabel];
    _contentLabel.textAlignment = NSTextAlignmentNatural;
    self.contentLabel.font = [UIFont systemFontOfSize:15];
    _contentLabel.sd_layout
    .leftSpaceToView(self, 5)
    .rightSpaceToView(self, 5)
    .topSpaceToView(self, 10)
    .autoHeightRatio(0);
    [self setupAutoHeightWithBottomView:self.contentLabel bottomMargin:0];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
